package org.spring.cloud.util;

import java.io.IOException;
import java.io.InputStreamReader;
import java.io.Reader;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.google.common.io.CharStreams;

import redis.clients.jedis.Client;

public class LuaReaderUtils {

	private LuaReaderUtils() {}
	
	private static final Logger logger = LoggerFactory.getLogger(LuaReaderUtils.class);
	
	// 加载Lua代码
	private String loadScriptString(String fileName) {
	    try {
	    	Reader reader = new InputStreamReader(Client.class.getClassLoader().getResourceAsStream(fileName));
			return CharStreams.toString(reader);
		} catch (IOException e) {
			logger.error("读取文件出错",e);
		}
	    return null;
	}
	
	
}
